Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add FastTreeSHAPv1 implementation for EvoTrees #270

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kpa28-git
Copy link

I was sad to find Julia doesn't have a TreeSHAP implementation so I ported FastTreeSHAPv1 for my favorite boosted trees library. This PR is in case others find it useful.

This is marked as a draft for a few reasons:

  1. To gauge interest to see if SHAP values should be in this package at all
  2. The code runs but the results haven't yet been tested or compared to other SHAP value libraries yet
  3. I'm not very familiar with the FastTreeSHAP algorithm, this was a simple 1:1 port of the pseudocode. So suggestions are very welcome
  4. There may be a better way to parallelize this without using Channels. I usually use a tmap implementation for these kinds of parallel tasks, but I didn't want to add dependencies to the package just for this. Again, suggestions are welcome.

@tecosaur
Copy link

You should be able to compare SHAP values to those from https://github.com/nredell/ShapML.jl, which has been tested against other implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants